from manim import *
from numpy import flip, insert

LV,QL,QH,JH='#75cfb8','#bbdfc8','#f0e5d8','#ffc478'

class p1(MovingCameraScene):
    def construct(self):
        # self.add(NumberPlane().set_color(GRAY))
        # self.camera.frame.scale(0.5)
        r=np.sqrt(5)
        c_1=Circle(r)
        line=Line(LEFT*r,RIGHT*r)
        s_1=Square().shift(UP).set_fill(LV,1)
        left=VGroup(c_1,line,s_1).shift(LEFT*3)
        # right
        c_2=Circle(r)
        s_2=Square(np.sqrt(10)).set_fill(LV,1)
        right=VGroup(c_2,s_2).shift(RIGHT*3)
        self.add(left,right)
        self.wait()

class p2(MovingCameraScene):
    def construct(self):
        self.add(NumberPlane().set_color(GRAY))
        # self.camera.frame.scale(0.5)
        r=np.sqrt(5)
        c_1=Circle(r)
        line=Line(LEFT*r,RIGHT*r)
        s_1=Square().shift(UP).set_fill(LV,0.5)
        left=VGroup(c_1,line,s_1).shift(LEFT*3)
        # right
        c_2=Circle(r)
        s_2=Square(np.sqrt(10)).set_fill(LV,0.5)
        right=VGroup(c_2,s_2).shift(RIGHT*3).rotate(18*DEGREES)
        self.add(left,right)
        self.wait()